OpenCities Map Help

Assign Foreign Key with an Annotation

In addition to the primary key, a foreign key constraint needs to be created to express the relationship between the data in the parent table and the table used to store annotations.

Adding a foreign key to link the Owner_Text table to the customers table requires the following ALTER TABLE statement:

ALTER TABLE OWNER_TEXT
ADD CONSTRAINT OWNER_TEXT_FK 
FOREIGN KEY (Parcel_ID_REF) 
REFERENCES PARCELS (Parcel_ID)
ON DELETE CASCADE;

This will ensure that the two tables are tied together and that a delete of a row in the root table will trigger a delete of all the rows that in the annotation table that have a reference to the deleted root table row.

The combination of the root and annotation tables, connected through the foreign key should be sufficient for Bentley Map to extract/modify/post features with annotations.